package com.ln.lnzw.adapter;

import android.support.annotation.Nullable;
import android.text.Html;
import android.util.Log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ln.lnzw.R;
import com.ln.lnzw.bean.ConsultationReplyBean;
import com.ln.lnzw.bean.WcmBean;

import java.util.List;

/**
 * Created by wuwei on 2018/6/12.
 */

public class ConsultationReplyAdapter extends BaseQuickAdapter<ConsultationReplyBean.ResultBean.ListBean,BaseViewHolder> {
    public ConsultationReplyAdapter(int layoutResId, @Nullable List<ConsultationReplyBean.ResultBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ConsultationReplyBean.ResultBean.ListBean item) {
        if (item.getReplys().isEmpty()){
            helper.setText(R.id.tv_consultation_reply,"暂无");
        }else{
            helper.setText(R.id.tv_consultation_reply, item.getReplys().get(0).getApproveContent());
        }
        helper.setText(R.id.tv_consultation_name, item.getApplyTitle());
        helper.setText(R.id.tv_consultation_content,item.getApplyContent());
        helper.setText(R.id.tv_consultation_matter,Html.fromHtml("<strong><font color=#333333>" + "咨询事项：" + "</font></strong>"+item.getApplyProcessName()));
//        helper.setText(R.id.tv_consultation_reply,"暂无");
    }
}
